Learning outcomes -- Edited by Doris Xue on June 15th.

1.How to use the resource on Wiki:

One of the resources is python documentation, if you want to find more information about python such, just click the link so that you can find the introduction on python official website.

Some basic using about turtle mentioned in class:

turtle.dot/turtle.stamp

turtle.dot(size,color), if there is not variable

turtle.speed(0)fastest is 0, plot the graph immediately

turtle.pos(),print the position of turtle

Three groups about extra using about turtle:

Using events of turtle: onelick()and etc.

Using screen events

Animation control

How to find modules in official python website:

python -> modules (to find modules you need such as math, turtle matplotlib, numpy, scipy(After import, python can be used as matlab)

2.How to change the size and color of codes in PyCharm:

setting -> editor -> colors and fonts -> font

3.Four basic parts of PROGRAM

1.INPUT

input()
input(‘please’) -> a (variable)
a = input(‘please’)

2.OUTPUT

print()
example: print list (0,varible) in one line
first method:

for i in range (0,11):
    print(i,end =,)   #every i in for iteration is end with the character inside ' '
second method:
a = int(input(‘up-limit:’))
b = ‘’
for i in range(0,a+1)
    b = str(a)+b
    print b    #turn int into str
third method:
a=int(input())
b=[ ]
for i in range(0.a+1)
    b.append(i)
    print b    #print a list

3.SELECTION

if <condition> :
<statement a> #when condition is ture
elif <condition>:
<statement c> #elif==else: -> if
else:
<statement b>
Example:power school model: Justify the level of user’s grade using selection
90-100 A*
80-90 A
70-89 B
60-79 C
<60 D
while 1:
    a = int(input('grade:'))
    if a >= 0 and grade <= 100:
        break
 
if a >= 90:
    print('A*')
elif a >= 80:
    print('A')
elif a >= 70:
    print('B')
elif a >= 60:
    print('C')
else :
    print('U')

4.ITERATION

1.for

for i in range(a,b)/list[a,b]
Every iteration of i , i equal to next variable
2.while <condition>:
Every integration of i, programmer must change the variable
3.while 1:
<statement>
if<condition>:
break

4.Homework:

How to think like a computer scientist chapter 3 : end of chapter

Have Fun !